package com.furongji.education.domain.po;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 课程视频
 * </p>
 *
 * @author furongji
 * @since 2025-05-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("section")
@Schema(description="课程视频")
public class Section implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "视频ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @Schema(description = "课程ID")
    private String courseId;

    @Schema(description = "章节ID")
    private String chapterId;

    @Schema(description = "节点名称")
    private String title;

    @Schema(description = "云端视频资源")
    private String videoSourceId;

    @Schema(description = "原始文件名称")
    private String videoOriginalName;

    @Schema(description = "播放次数")
    private Long playCount;

    @Schema(description = "是否可以试听：0收费 1免费")
    private Boolean isFree;

    @Schema(description = "视频时长（秒）")
    private Float duration;

    @Schema(description = "Empty未上传 Transcoding转码中  Normal正常")
    private String status;

    @Schema(description = "视频源文件大小（字节）")
    private Long size;

    @Schema(description = "乐观锁")
    private Long version;

    @Schema(description = "0 未删除,1 已删除")
    @TableLogic
    private Boolean isDeleted;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;

}
